/**
 * Created by chensk740 on 2018/1/3.
 */
import {Component, Input, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {Subject, Observable, BehaviorSubject} from 'rxjs';

@Component({
  selector: 'collect-item',
  templateUrl: 'collect-item.component.html',
  styleUrls: ['collect-item.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class CollectItemComponent implements OnInit, OnDestroy {
  public ngUnsubscribe: Subject<void> = new Subject<void>();
  @Input() collectList;
  constructor(
              public route: ActivatedRoute,
              public router: Router,
  ) {

  }

  goGoodDetail(url) {
    this.router.navigate([url]);
    /**this.router.navigate(['/goods/detail'], {queryParams: {goodsCode: id}});*/
  }

  ngOnInit() {
  }


  ngOnDestroy() {
    this.ngUnsubscribe.next();
    this.ngUnsubscribe.complete();
  }
}
